package com.zheng.wechat.app.admin.controller;


import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

public class AppController {

    @RequestMapping(value = "/users/check_login", method = RequestMethod.POST)
    @ResponseBody
    public String check_login() {
        return "{\"status\":200}";
    }

    @RequestMapping(value = "/users/get_login", method = RequestMethod.POST)
    @ResponseBody
    public String get_login() {
        return "{\"status\":200,\"data\":{\"session_id\":1,\"school\":{\"weeknum\":\"*\",\"weekday\":1,\"term\":12},\"is_bind\":1,\"is_bind_mealcard\":1,\"is_bind_library\":1,\"show_banner\":1,\"is_admin\":1,\"is_teacher\":1,\"teacher\":{\"teacherid\":\"5885\",\"realname\":\"冯唐泉\",\"dept\":\"3年级1班\",\"duties\":\"班主任\"},\"student\":{\"studentid\":\"464725602\",\"realname\":\"冯唐泉\",\"classname\":\"小1班\",\"dept\":\"数信学院\",\"specialty\":1},\"userinfo\":1212}}";
    }

    @RequestMapping(value = "/users/get_userinfo", method = RequestMethod.POST)
    @ResponseBody
    public String get_userinfo(String session_id,String key,String iv,String rawData,String signature) {
        return "{\"status\":200}";

    }


    @RequestMapping(value = "/get_group_msg", method = RequestMethod.POST)
    @ResponseBody
    public String get_group_msg(String session_id,String roomTopic,String rawData,String signature,String encryptedData,String iv) {
        return "{\"status\":200}";

    }

    @RequestMapping(value = "/msg/get_news_list", method = RequestMethod.GET)
    @ResponseBody
    public String get_news_list(String session_id,String news_type,String page) {
        return "{\"status\":200,\"message\":\"ok\",\"errMsg\":\"\",\"data\":[{\"articleid\":1,\"type\":\"all\",\"dept\":\"部门\",\"title\":\"广告主观望估值缩水 今日头条万人审核流程揭秘\",\"time\":\"2018-04-20 00:00:00\"},{\"articleid\":1,\"type\":\"new\",\"dept\":\"部门\",\"title\":\"今日头条关注度第一 OPPO R15星空紫已成新爆品\",\"time\":\"2018-04-20 00:00:00\"},{\"articleid\":1,\"type\":\"new\",\"dept\":\"部门\",\"title\":\"新华网:今日头条的幡然醒悟值得肯定;天猫一分钟卖8万榴莲震惊泰国\",\"time\":\"2018-04-20 00:00:00\"},{\"articleid\":1,\"type\":\"all\",\"dept\":\"部门\",\"title\":\"今日头条李航:自然语言对话的现状与未来 | 北大AI公开课实录\",\"time\":\"2018-04-20 00:00:00\"},{\"articleid\":1,\"type\":\"xb\",\"dept\":\"部门\",\"title\":\"百度与梨视频合作落地 这么着急就为牵制今日头条?\",\"time\":\"2018-04-20 00:00:00\"},{\"articleid\":1,\"type\":\"new\",\"dept\":\"部门\",\"title\":\"抖音日收入3200万元,在今日头条总收入中占比33%\",\"time\":\"2018-04-20 00:00:00\"}]}";

    }

    @RequestMapping(value = "/users/get_schedule", method = RequestMethod.POST)
    @ResponseBody
    public String get_schedule(String is_teacher,String session_id,String week,String weekweekday) {
        return "{\"status\":200,\"message\":\"ok\",\"errMsg\":\"\",\"show\":true,\"data\":[{\"day\":[{\"wid\":0,\"weeks\":[1,2,3],\"number\":1,\"left\":2,\"color\":\"red\",\"place\":\"1先骕楼3901\",\"name\":\"微积分\",\"teacher\":\"李老师\",\"all_week\":\"15-16周\",\"class_id\":\"4701\",\"cid\":1,\"type\":\"必修\"},{\"wid\":1,\"weeks\":[1,2,3],\"number\":1,\"left\":2,\"color\":\"yellow\",\"place\":\"2先骕楼3905\",\"name\":\"大学语文\",\"teacher\":\"李老师\",\"all_week\":\"15-16周\",\"class_id\":\"4701\",\"cid\":2,\"type\":\"必修\"},{\"wid\":2,\"weeks\":[1,2,3],\"number\":1,\"left\":2,\"color\":\"purple\",\"place\":\"3先骕楼334\",\"name\":\"运筹学\",\"teacher\":\"李老师\",\"all_week\":\"15-16周\",\"class_id\":\"4701\",\"cid\":3,\"type\":\"必修\"},{\"wid\":3,\"weeks\":[1,2,3],\"number\":1,\"left\":2,\"color\":\"purple\",\"place\":\"4先骕楼3101\",\"name\":\"软件工程\",\"teacher\":\"李老师\",\"all_week\":\"15-16周\",\"class_id\":\"4701\",\"cid\":4,\"type\":\"必修\"}]},{\"day\":[{\"wid\":5,\"weeks\":[1,2,3],\"number\":1,\"left\":2,\"color\":\"purple\",\"place\":\"5先骕楼3901\",\"name\":\"微积分\",\"teacher\":\"李老师\",\"all_week\":\"15-16周\",\"class_id\":\"4701\",\"cid\":11,\"type\":\"必修\"},{\"wid\":6,\"weeks\":[1,2,3],\"number\":1,\"left\":2,\"color\":\"purple\",\"place\":\"6先骕楼3905\",\"name\":\"大学语文\",\"teacher\":\"李老师\",\"all_week\":\"15-16周\",\"class_id\":\"4701\",\"cid\":12,\"type\":\"必修\"},{\"wid\":7,\"weeks\":[1,2,3],\"left\":2,\"number\":1,\"color\":\"purple\",\"place\":\"7先骕楼334\",\"name\":\"运筹学\",\"teacher\":\"李老师\",\"all_week\":\"15-16周\",\"class_id\":\"4701\",\"cid\":13,\"type\":\"必修\"},{\"wid\":8,\"weeks\":[1,2,3],\"number\":1,\"left\":2,\"color\":\"red\",\"place\":\"8先骕楼3101\",\"name\":\"软件工程\",\"teacher\":\"李老师\",\"all_week\":\"15-16周\",\"class_id\":\"4701\",\"cid\":14,\"type\":\"必修\"}]}]}";
    }

    @RequestMapping(value = "/users/get_mealcard", method = RequestMethod.POST)
    @ResponseBody
    public String get_mealcard(String session_id,Boolean index) {
        return "{\"status\":200,\"data\":{\"message\":\"ok\",\"outid\":\"465744554\",\"lasttime\":\"2018-04-20\",\"mainFare\":80.8,\"title\":\"新闻标题\",\"time\":\"2018-04-20\",\"status\":\"使用中\",\"electric_xffare\":489,\"electric_xffare_per\":0.04,\"meal_xffare\":3222,\"meal_xffare_per\":0.54},\"errMsg\":\"\"}";

    }


    @RequestMapping(value = "/users/get_user_library", method = RequestMethod.POST)
    @ResponseBody
    public String get_user_library(String session_id,boolean renew,boolean index) {
        return "{\"status\":200,\"data\":{\"message\":\"ok\",\"books_num\":31,\"arrears_money\":85.9,\"book\":[{\"book_name\":\"未来十年\",\"book_type\":\"计算机学院\",\"return_time\":\"2018-04-20\",\"time\":\"2018-04-20 00:00:00\"},{\"book_name\":\"稻盛和夫的管理\",\"book_type\":\"文学院\",\"return_time\":\"2018-04-20\",\"time\":\"2018-04-20 00:00:00\"},{\"book_name\":\"互联网的世界\",\"book_type\":\"软件学院\",\"return_time\":\"2018-04-20\",\"time\":\"2018-04-20 00:00:00\"}]},\"errMsg\":\"\"}";

    }

    @RequestMapping(value = "/get_empty_room", method = RequestMethod.POST)
    @ResponseBody
    public String get_empty_room(String is_teacher,String session_id,String week,String weekweekday) {
        return "{\"status\":200,\"data\":[{\"room\":\"3501\"},{\"room\":\"3502\"},{\"room\":\"3503\"},{\"room\":\"4501\"},{\"room\":\"4502\"},{\"room\":\"4503\"},{\"room\":\"4504\"}],\"errMsg\":\"\"}";

    }

    @RequestMapping(value = "/users/get_score", method = RequestMethod.POST)
    @ResponseBody
    public String get_score(String session_id,String student_id) {
        return "{\"status\":200,\"message\":\"ok\",\"errMsg\":\"\",\"id\":\"464725602\",\"name\":\"冯唐泉\",\"rank\":11,\"year\":\"2018\",\"term\":\"下\",\"update_time\":\"2018-04-20 00:00:00\",\"data\":[{\"lesson_name\":\"数学\",\"pscj\":90,\"qmcj\":89,\"score\":97,\"bkcj\":78,\"time\":\"2018-04-20 00:00:00\"},{\"lesson_name\":\"英语\",\"pscj\":90,\"qmcj\":89,\"score\":97,\"bkcj\":78,\"time\":\"2018-04-20 00:00:00\"},{\"lesson_name\":\"语文\",\"pscj\":90,\"qmcj\":89,\"score\":97,\"bkcj\":78,\"time\":\"2018-04-20 00:00:00\"},{\"lesson_name\":\"物理\",\"pscj\":90,\"qmcj\":89,\"score\":97,\"bkcj\":78,\"time\":\"2018-04-20 00:00:00\"}]}";

    }


    @RequestMapping(value = "/get_exam_info", method = RequestMethod.POST)
    @ResponseBody
    public String get_exam_info(String session_id,String student_id) {
        return "{\"status\":200,\"data\":[{\"day\":5,\"time\":\"09:40\",\"days\":54,\"room\":\"仙术楼5楼403-A\",\"countdown\":21,\"type\":\"期中\",\"course\":\"模拟考试\",\"exam_num\":32,\"week\":4,\"day\":\"四\",\"lesson\":\"上午\",\"main_supervisor\":\"狐仙首\",\"main_supervisor_phone\":\"15895885585\",\"supervisor\":\"杨红樱\",\"supervisor_phone\":\"18024001585\"},{\"day\":5,\"time\":\"09:40\",\"days\":54,\"room\":\"仙术楼5楼403-A\",\"countdown\":21,\"type\":\"期中\",\"course\":\"模拟考试\",\"exam_num\":32,\"week\":4,\"day\":\"二\",\"lesson\":\"下午\",\"main_supervisor\":\"狐伊犁州\",\"main_supervisor_phone\":\"15895885585\",\"supervisor\":\"杨红樱\",\"supervisor_phone\":\"18024001585\"},{\"day\":5,\"time\":\"09:40\",\"days\":54,\"room\":\"仙术楼5楼403-A\",\"countdown\":21,\"type\":\"期中\",\"course\":\"模拟考试\",\"exam_num\":32,\"week\":4,\"day\":\"三\",\"lesson\":\"上午\",\"main_supervisor\":\"狐仙首\",\"main_supervisor_phone\":\"15895885585\",\"supervisor\":\"杨红樱\",\"supervisor_phone\":\"18024001585\"}],\"errMsg\":\"\"}";

    }

}